{% extends "base.html" %}

{% block content %}
<div class="container">
    <div class="page-header">
        <h1>Hello, 这里是聊天室 {{ rname }} 所有的用户哦!</h1>
    </div>
    {% for user in ulist %}
    <p>
        <button class="btn btn-primary">{{ user }}</button>
        {% if user in b_user %}
        <span class="label label-default">禁言中。。。</span>
        {% endif %}
    </p>
    <p>
        <div class="btn-group">
            <button type="button" class="btn btn-warning">禁言</button>
            <button type="button" class="btn btn-warning dropdown-toggle dropdown-toggle-split" data-toggle="dropdown">
                <span class="caret"></span>
            </button>
            <div class="dropdown-menu">
                <li><a href="{{ url_for('main.block_roomuser', rname=rname, b_user=user, b_time=300)}}">5 Mins</a></li>
                <li><a href="{{ url_for('main.block_roomuser', rname=rname, b_user=user, b_time=600)}}">10 Mins</a></li>
                <li><a href="{{ url_for('main.block_roomuser', rname=rname, b_user=user, b_time=18000)}}">5 Hours</a></li>
                <li><a href="{{ url_for('main.block_roomuser', rname=rname, b_user=user)}}">永久禁言</a></li>
            </div>
        </div>
        <a href="{{ url_for('main.block_roomuser', rname=rname, b_user=user, b_time=1)}}" class="btn btn-info" role="button">解禁</a>
        <a href="{{ url_for('main.kick_roomuser', rname=rname, del_user=user) }}" class="btn btn-danger" role="button">踢出</a>
    </p>
    {% endfor %}
</div>
{% endblock %}